import React from 'react';
import ReactDOM from 'react-dom';
import App from './app';


import './global.css';  // 样式重置CSS
import './index.css';   // 项目公共CSS
import './fonts/css/font-awesome.min.css' // 字体CSS

// 请求地址设置
if (window.location.origin === "http://wechat.juzhen05.com") {
  window.requestOrigin = "http://api.juzhen05.com";
} else {
  window.requestOrigin = "http://localhost:61339";
}

// rem计算
var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
var recalc = function () {
  var clientWidth = document.documentElement.clientWidth;

  if (!clientWidth) return;
  document.documentElement.style.fontSize = 100 * (clientWidth / 1024) + 'px';
};

window.addEventListener(resizeEvt, recalc, false);
recalc();

ReactDOM.render(
  <App />,
  document.getElementById('root')
);
